<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        .main {
            width: 300px;
            background-color: #999999;
            display: inline-grid;
            grid-template-columns: 100px 100px 100px;
            grid-template-rows: 100px;

            grid-auto-flow: row;
            grid-auto-rows: 100px;
        }

        .main div {
            background-color: skyblue;
            box-sizing: border-box;
            border: 1px solid red;
        }
    </style>
</head>
<body>
<div class="main">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    <div>7</div>
    <div>8</div>
    <div>9</div>
    <div>10</div>
    <div>10</div>
    <div>10</div>
    <div>10</div>
</div>
</body>
</html>
